<template>
  <div style="width:420px;height:250px" ref="chart"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
    data(){
        return{
           hwdata:[80,100,98,80,67],
           vivodata:[90,90,88,78,90]
        }
    },
    computed:{
        options(){
            return{
            legend:{
                orient:'vertical',
                right:10,
                bottom:10
            },
            radar:{
                shape:'circle',
                startAngle:130,
                indicator:[
                    {name:'易用性',max:100},
                    {name:'安全性',max:100},
                    {name:'流畅度',max:100},
                    {name:'功能性',max:100},
                    {name:'性价比',max:100},
                ] 
            },
            series:[
                {
                    type:'radar',
                    lineStyle:{
                         color: 'rgba(255,255,0,1)'
                    },
                    data:[
                        {
                            name:'华为',
                            value:this.hwdata
                        },
                         {
                            name:'vivo',
                            value:this.vivodata
                        }
                    ]
                }
            ]
        }
        }
    },
    mounted(){
        let chart=echarts.init(this.$refs.chart)
        chart.setOption(this.options)
    }
}
</script>

<style>

</style>